﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;

namespace IHISCETeim.BLL
{
    public class MBaoYangController
    {
        public static int Add(MBaoYangInfo obj)
        {
            return MBaoYangDAL.Add(obj);
        }
        public static bool Delete(int id)
        {
            return MBaoYangDAL.Delete(id);
        }
        public static MBaoYangInfo GetByID(int id)
        {
            return  CBO.FillObject<MBaoYangInfo>( MBaoYangDAL.GetByID(id));
        }

        public static MBaoYangInfo GetByJH(string JH)
        {
            return CBO.FillObject<MBaoYangInfo>(MBaoYangDAL.GetByJH(JH));
        }

        public static DataTable GetPagination(string whereSql, int PageIndex, int PageSize, string Sort, ref int TotalCount)
        {
            return MBaoYangDAL.GetPagination(whereSql, PageIndex, PageSize, Sort, ref  TotalCount);
        }
        public static bool Update(MBaoYangInfo obj)
        {
            return MBaoYangDAL.Update(obj);
        }
    }
}
